package com.jinlejia.erp.utils;

import android.content.Context;

import com.litesuits.orm.LiteOrm;
import com.litesuits.orm.db.DataBaseConfig;

/**
 * Created by Administrator on 2017/6/17 0017.
 */

public class DbUtil {
    private static LiteOrm db;

    public static LiteOrm getDB(Context context) {
        DataBaseConfig config = new DataBaseConfig(context);
        config.debugged = false; //是否打Log
        config.dbVersion = 2; // database Version
        config.onUpdateListener = null; //升级
        config.dbName="jinlejia_erp.db";

        if( null == db )
            db = LiteOrm.newSingleInstance(config);
        return db;
    }
}
